1. Field of the Invention
The present invention relates to an address recognition apparatus, and more specifically to an apparatus for reading an address from the handwritten characters in a free-pitch area.
2. Description of the Related Art
The conventional optical character recognition apparatus (OCR) specifies a place-name area, and reads an address by extracting a segmentation character (hereinafter referred to as a key character) which can be a delimiter of a place name as a result of recognizing characters one by one.
FIG. 1 is a block diagram showing the configuration of the conventional address recognition apparatus.
In FIG. 1, a character segmentation unit 501 segments a character for all possible segmentation candidates. A character recognition unit 502 outputs the recognition results of the first candidate through the Nth candidates in all possible candidates which can be segmented as a character. If any of the key characters xe2x80x98xe2x80x99 (capital city), xe2x80x98xe2x80x99 (prefecture), xe2x80x98xe2x80x99 (prefecture), xe2x80x98xe2x80x99 (prefecture), xe2x80x98xe2x80x99 (city), xe2x80x98xe2x80x99 (county), xe2x80x98xe2x80x99 (ward), xe2x80x98xe2x80x99 (town), xe2x80x98xe2x80x99 (village), xe2x80x98xe2x80x99 (area), etc. is included in the first through the Nth candidates, then a key character extraction unit 503 extracts the corresponding candidate as a key character.
A place-name area candidate retrieval unit 504 retrieves an area between key characters as a place-name area candidate. A place-name retrieval unit 506 compares character by character the first candidate through the Mth (Mxe2x89xa6N) candidates with a place-name dictionary 505, and retrieves a place-name in the place-name dictionary 505 as a place-name candidate if any one character of the place-name matches the first through Mth candidates. The place-name candidate evaluation value operation unit 507 computes the evaluation value of the a place-name candidate to obtain the most probable place-name candidate from among the place-name candidates retrieved by the place-name retrieval unit 506. The place-name candidate selection unit 509 checks whether or not the place-name candidate retrieved by the place-name retrieval unit 506 is consistent with the place-name candidates before and after the present candidate. If it is consistent, the present place-name candidate is output as an address.
The conventional address recognition apparatus is described in, for example, the Tokukaihei 7-262320.
However, the conventional address recognition apparatus has the problem that it often makes a read error when it reads an address from a handwritten character string in a free-pitch area, and when characters to be read contact with each other. The. contact characters are read as one character.
There is also the problem with the conventional apparatus that the number of patterns to be recognized increases because all possible candidates segmented from a free-pitch area are recognized, thereby requiring a large amount of processes.
Furthermore, when any key character is contained in the first candidate through the Nth candidates, all the candidates are extracted as key characters. Thus, a non-key character is extracted as a key character, and a number of combinations of key characters for segmenting place-name areas appear, thereby requiring a large amount of processes.
If there are place-names, in the first through the Mth candidates, containing a character matching the character contained in the place-name entered in the place-name dictionary 505, the place-names are all retrieved as place-name candidates. Therefore, a large number of place-name candidates are to be recognized, thereby requiring a large amount of processes to specify the address.
The first object of the present invention is to provide an address recognition apparatus capable of recognizing an address with high precision even if characters contact with each other.
The second object of the present invention is to provide an address recognition apparatus capable of recognizing an address with high precision.
To solve the above listed problems, the present invention includes a key character extraction unit for extracting a key character based on the result of separating contact characters; a place-name area extraction unit for extracting a place-name area based on the position of the key character; and a place-name recognition unit for recognizing the place-name of the place-name area based on the state of the contact characters before separated.
Even if characters forming a character string indicating an address contact with each other, the key character in the character string can be correctly extracted, the entire character string indicating a place-name can be extracted and processed in recognizing the place-name. Therefore, the process of segmenting a character string indicating a place-name into characters can be omitted, and the address can be efficiently recognized. Since it is not necessary to segment a character string indicating a place-name, mis-segmentation of the character string indicating the place-name can be avoided, thereby improving the correctness in address recognition.
According to an aspect of the present invention, the feature vector of the entire pattern segmented by a key character is compared with the feature vector of the place-name entered in the place-name entry dictionary so that the place-name can be recognized.
Thus, the character string indicating the place-name can be recognized without segmentation into single characters, thereby improving the efficiency and correctness in address recognition.
According to another aspect of the present invention, a place-name is entered for each attribute specified by a key character, and the feature vector of a pattern segmented by a key character is compared with a place-name having the attribute specified by a key character.
Thus, for example, if the attribute of the pattern segmented by a key character is xe2x80x98xe2x80x99 (prefecture), a comparing operation is performed using a dictionary containing place-names of xe2x80x98xe2x80x99 (prefecture), thereby performing the comparing operation corresponding to the attribute specified by a key character with improved recognition precision.
According to a further aspect of the present invention, when a connected pattern extracted from an input pattern is separated, the separated position is evaluated based on the size of an input pattern.
Thus, when a key character is extracted from an input pattern, the connected pattern can be separated for the size appropriate for extracting the key character. Therefore, the number of separation positions of the connected pattern can be reduced, and the number of times of the recognizing operations can also be reduced, thereby efficiently recognizing the address.
According to a further aspect of the present invention, a connected pattern for which a separation position can be detected based on the size of the connected pattern can be selected.
Thus, the separation position is detected for only a relatively large connected pattern which probably contains contact characters. For a small connected pattern not regarded as containing contact characters, the detection of a separation position can be omitted, thereby improving the efficiency in address recognition.
According to a further aspect of the present invention, if the value of the minimum point of the histogram of the number of black picture elements in the input pattern is equal to or smaller than a predetermined value, it is defined as a separation point candidate.
As a result, a narrow portion of a character can be distinguished from a contact point between characters, and only the contact point between characters can be detected with high precision. Thus, a connected pattern can be separated at a contact point with high precision.
According to a further aspect of the present invention, if the height-to-width ratio of a separated pattern refers to an area out of a predetermined range, the separation point is removed from separation point candidates.
Thus, the connected pattern can be prevented from being separated into portions of size inappropriate when a key character is extracted, and can be prevented from being separated into patterns not containing a key character, thereby efficiently recognizing an address with wasteful processes omitted for a pattern not containing a key character.
According to a further aspect of the present invention, when characters are horizontally written, the positions of the multiples of the half width of the character of an average size is computed. When characters are vertically written, the positions of the multiples of the half height of the character of an average size is computed. And, only a minimum point within a predetermined range before and after the computed point is defined as a provisional separation point candidate among the minimum points of a histogram of the number of black picture elements.
Thus, a part of a key character can be efficiently extracted from among contact characters even if only the left or right part of the key character contacts with another character when characters are horizontally written, and even if only the upper or lower part of the key character contacts with another character when characters are vertically written, thereby efficiently restoring the original key character.
According to a further aspect of the present invention, a provisional separation point candidate is the minimum point having the value of the histogram of the number of black picture elements in the points within a predetermined range from the position of a multiple of a half size of an average character.
Thus, even if there are a plurality of minimum points having the minimum value of the histogram of the number of black picture elements in the points within a predetermined range from the position of a multiple of a half size of an average character, only one provisional separation point candidate can be extracted. As a result, processes can be prevented from being complicated by separating a connected pattern into a number of portions at positions not delimiting characters.
According to a further aspect of the present invention, a provisional separation point candidate is a point closest to the position of a multiple of a half size of an average character among the points having the minimum values of the histogram of the number of black picture elements.
Thus, even if there are a plurality of minimum points having the minimum value of the histogram of the number of black picture elements in the points within a predetermined range from the position of a multiple of a half size of an average character, only one provisional separation point candidate can be extracted. As a result, processes can be prevented from being complicated by separating a connected pattern into a number of portions at positions not delimiting characters.
According to a further aspect of the present invention, a key character can be extracted based on the result of integrating separated portions of a pattern.
Thus, even if only a part of a character contacts with another character, the part of the character can be separated from the other character, and the separated part of the character can be integrated into the remaining part of the character to form the original character, thereby preventing a key character from being mis-recognized.
According to a further aspect of the present invention, a place-name area can be extracted from among the key character candidates extracted from the input pattern by prioritizing a key character candidate ranking a higher order.
Thus, a character mis-extracted as a key character candidate can be prevented from being used in extracting a place-name area. As a result, the number of candidates to be extracted as place-name candidates can be reduced, and the number of times of the place-name recognizing processes can be reduced, thereby improving the efficiency in address recognition.
According to a further aspect of the present invention, a pattern information table of a key character candidate containing a key character level, a key character type, a hierarchical level, position coordinates, information as to whether or not a pattern is to be incorporated into an adjacent pattern is generated.
Thus, the process can be quickly performed by referring to the pattern information table to improve the efficiency in address recognition.
According to a further aspect of the present invention, it is determined whether or not the arrangement order and positions of key characters, or the combination of key characters are appropriate for the indication of addresses.
Therefore, even if a key character of an address is contained in characters which represent a place-name, the key character contained in the characters which represent the place-name can be removed from key characters to be extracted, so that a character only used to indicate the hierarchical level of the place-name can be extracted as a key character, thereby preventing a place-name area from being mis-extracted, and efficiently recognizing an address.
According to a further aspect of the present invention, when there is a key character specified by a partial selection item, a set of key character candidates is determined from a hierarchical level lower than the hierarchical level of the key character.
Thus, when a partial selection items are given to specify an address using, for example, a questionnaire postcard, the precision in key character extraction can be improved.
According to a further aspect of the present invention, when a set of key characters appropriate for an indication of an address cannot be obtained only by using a key character candidate ranking a higher order, a key character candidate ranking a lower order is added.
Thus, a place-name area can be correctly extracted, and the number of key character candidates can be limited to the smallest possible number.
According to a further aspect of the present invention, what is lacking in a set of key characters used to indicate that an address is selected among key character candidates ranking lower orders and is added to key character candidates.
Thus, only necessary candidates are selected as key character candidates from among key character candidates ranking lower orders so that key characters can be efficiently extracted.
According to a further aspect of the present invention, the key character level of a key character candidate extracted from a character string indicating an address is computed, and a set of key character candidates is determined by prioritizing key character candidates having higher key character levels.
Thus, when a set of key character candidates consistent in address hierarchical structure knowledge and in address key character position knowledge is determined, the processing time can be shortened by decreasing the number of sets of key character candidates, thereby efficiently recognizing an address.
According to a further aspect of the present invention, it is determined whether or not a combination of place-names indicating addresses or the arrangement order of place-names indicating an address are appropriate.
Thus, if a plurality of place-name candidates are indicated to a pattern of a place-name area and a plurality of address candidates can be obtained by combining the place-name candidates, then combinations of place-names not expressing actual addresses are deleted so that only existing addresses can be identified, thereby improving the precision in address recognition.
According to a further aspect of the present invention, an address recognition result obtained by checking in character units a pattern extracted from a character string indicating an address is also output.
As a result, even if a key character has not been successfully extracted, the address can be correctly recognized and the reliability in address recognition can be improved.
According to a further aspect of the present invention, the character type entered in the key character recognition dictionary is limited to the key character type and the character type similar to the key character type.
Therefore, when a key character is extracted from the pattern segmented from an input image, the number of comparisons between the pattern segmented from the input image and the character type entered in the key character recognition dictionary can be reduced much more than the case where all character types are entered in the key character recognition dictionary, thereby shortening the processing time in recognizing an address.
On the other hand, when only key character types are entered in the key character recognition dictionary, the key character types always rank first in number of occurrences in recognizing any pattern. Therefore, when a pattern to be recognized is similar to a key character, then a pattern which is not a key character may be mistakenly extracted as a key character. On the other hand, if character types similar to key character types are entered, then, for a pattern which is similar to, but is not, a key character, the character types similar to the key character type ranks first in number of occurrences. As a result, the key character type ranks lower. Therefore, it can be determined, by checking the occurrence order of the key character type, whether or not a pattern which is similar to, but is not, a key character belongs to the key character type. Thus, a pattern which is similar to, but is not, a key character can be prevented from being mistakenly extracted as a key character.
According to a further aspect of the present invention, if the ratio of the number K of the sample patterns containing the key character type in the N-th order as a result of the character recognition to the number M of the sample patterns processed for character recognition of a character type is equal to or larger than a predetermined value, the character type is defined as a similar character type of the key character type.
Thus, it is possible to specify, among various hand-written characters, a pattern of a non-key character frequently and mistakenly extracted as a key character, thereby determining a character type similar to the key character type with high precision.